﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Security.Principal;
using System.Text;

namespace CommerceOne.Domains.Authentication
{
    public class CommerceOneIdentity : IIdentity
    {
        public CommerceOneIdentity(int id, string name, string role)
        {
            this.Name = name;
            this.Role = role;
            this.ID = id;
        }

        public string AuthenticationType
        {
            get { return "CommerceOneIdentity"; }
        }

        public bool IsAuthenticated
        {
            get { return !String.IsNullOrEmpty(this.Name); }
        }

        public string Name { get; private set; }
        public int ID { get; private set; }
        public string Role { get; private set; }
    }
}
